source "http://rubygems.org"

# Hacks for unreleased versions
if ENV['RAILS_EDGE']
  gem 'rack', github: 'rack/rack', branch: 'master'
  gem 'arel', github: 'rails/arel', branch: 'master'
  gem 'rails', github: 'rails/rails', branch: 'master'
else
  gem 'rails', ENV['RAILS_VERSION']
end

major, minor, patch = RUBY_VERSION.split('.').map{|i| i.to_i }

if major < 2
  if patch < 3
    gem 'i18n', '<= 0.6.11' # 0.7 requires Ruby 1.9.3
  end

  if ENV['RAILS_VERSION'].to_f == '3.2'
    gem 'rack-cache', '<= 1.2' # 1.3 requires Ruby 2
  end
end

gem 'skylight', path: ENV['SKYLIGHT_GEM_PATH'] || "../../"